Skip to content

fix(agent): use uv run for typecheck so env is synced before ty check#107

Open
scottschreckengaust wants to merge 2 commits into
aws-samples:mainfrom
scottschreckengaust:main
Open

fix(agent): use uv run for typecheck so env is synced before ty check#107
scottschreckengaust wants to merge 2 commits into
aws-samples:mainfrom
scottschreckengaust:main

Conversation

@scottschreckengaust
Copy link
Copy Markdown
Contributor

@scottschreckengaust scottschreckengaust commented May 15, 2026

Area

  • cdk — infrastructure, handlers, constructs
  • agent — Python runtime / Docker image
  • clibgagent client
  • docs — guides or design sources (docs/guides/, docs/design/)
  • tooling — root mise.toml, scripts, CI workflows

Tip: AGENTS.md lists where to edit and which tests to extend.

Related

Changes

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

bgagent and others added 2 commits May 15, 2026 23:26
`uvx ty check` ran ty in an ephemeral environment but auto-discovered
the project's `.venv` for import resolution. When the venv was
uninitialised (e.g. on first checkout before `mise run install`
succeeded), site-packages was empty and ty could not resolve boto3,
requests, pydantic, or claude-agent-sdk — causing //agent:quality to
fail with `unresolved-import` errors.

Switching to `uv run ty check` fixes this: uv syncs the project
environment from uv.lock before running any command, so type-checking
is always performed against the fully-installed dependency set
regardless of whether the venv was pre-populated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Task-Id: 01KRPZ3PF8ZBRZ2600GRJS2VF7
Prompt-Version: 1c9c10e027a2
fix(agent): use uv run for typecheck so env is synced before ty check

Merge pull request #2 from scottschreckengaust/bgagent/01KRPZ3PF8ZBRZ2600GRJS2VF7/fix-the-pre-existing-agentquality-type-c
@scottschreckengaust scottschreckengaust requested a review from a team as a code owner May 15, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant